/*
 * @Descripttion: 
 * @Author: liuYaoYu
 * @Date: 2021-12-12 15:13:47
 * @LastEditors: liuYaoYu
 * @LastEditTime: 2021-12-12 15:39:10
 */
package main

import (
	"fmt"
)

func test(n int){
	if n>2 {
		fmt.Println("当前n为",n)
		n--
		test(n)
	}else{
		fmt.Println("最终n为",n)
	}

}


func main(){
	var n int = 6
	// test(n)
	res:=fbn(n)
	fmt.Println(res)
}

// 斐波那契数
func fbn(n int) int{
	if n==1 || n==2{
		return 1
	}else{
		return fbn(n-1)+fbn(n-2)
	}
}